package com.wangshouyu.mp.offiaccount.message;

import com.wangshouyu.mp.message.VoiceMessage;

import java.util.Objects;

/**
 * @author 王守钰
 * @date 2020年12月07日 14:09
 * @description 客服语音消息
 */
public class KfVoiceMessage extends BaseKfMessage{

    /**
     * 语音
     */
    private VoiceMessage voice;

    public VoiceMessage getVoice() {
        return voice;
    }

    public void setVoice(VoiceMessage voice) {
        this.voice = voice;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        KfVoiceMessage that = (KfVoiceMessage) o;
        return Objects.equals(voice, that.voice);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), voice);
    }

    @Override
    public String toString() {
        return "KfVoiceMessage{" +
                "voice=" + voice +
                '}';
    }

    public KfVoiceMessage(VoiceMessage voice) {
        this.voice = voice;
    }

    public KfVoiceMessage() {
    }
}
